Denizen Script Language Explanations


Language Explanations explain components of Denizen in a more direct and technical way than The Beginner's Guide.


Showing 1 out of 56 language explanations...
NameToggle Button GUI Element
DescriptionToggle buttons control a single boolean value, toggling it when pressed; they have a UI type of "toggle_button".
See also Language:Button GUI Element for normal buttons.


ui_type: toggle_button
# The toggle button's label, optional.
label: <text>
# The texture to display when the toggle button is set to "true", optional.
on_texture: <GUI Texture>
# The texture to display when the toggle button is set to "false", optional.
off_texture: <GUI Texture>
# The texture to display when the toggle button is focused, optional.
focused_texture: <GUI Texture>
# The state the toggle button should be set to, optional (defaults to false).
state: <boolean>
# Code to run when the toggle button is toggled, optional.
# Provides <context.new_value>, returning an ElementTag(Boolean) of the toggle button's new value.
on_toggle:
- <script>
GroupGUI System
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/scripts/containers/gui/elements/ToggleButtonElement.java#L27